package com.example.springboot.config.event.normal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Service;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/12/2 10:47
 */
@Service
public class PublishMyapplicationEventService {
    @Autowired
    private ApplicationEventPublisher applicationEventPublisher;

    public void publish() {
        applicationEventPublisher.publishEvent(new MyApplicationEvent("czk,你好"));
    }
}
